
import java.util.Scanner;


public class UserInterface extends Player{

	//LinkedList<Player> list = new LinkedList<Player>();
	//stores input into list to be accessed by roster last to be printed out by roster class. 

	public static void main( String args[]){

		Roster ourRoster = new Roster();

		Scanner input = new Scanner (System.in);
		Scanner input1= new Scanner (System.in);
		Scanner input2= new Scanner (System.in);
		Scanner input3= new Scanner (System.in);
		Scanner input4= new Scanner (System.in);
		
		Team team = new Team();
		
		System.out.print("Welcome, Please insert the name of your team: ");
		team.setTeamName(input4.nextLine());
		

		System.out.print("Add Player? y/n?" );
		String answer = input.nextLine();
		
		while(answer.equals("y")){
			//return AddPlayer;
			//.addPlayer method methods??????????
			Player p = new Player();

			System.out.print("Enter player's first and last name: ");
			//String name = input1.nextLine();
			p.setPlayerName(input1.nextLine());

			System.out.print("Enter player's jersey number: ");
			//int number = input.nextInt(); //= input.nextInt();
			p.setJerseyNum(input.nextInt());

			System.out.print("Enter player's height in inches (Insert Digits Only): ");

			//int h = input.nextInt();
			p.setHeight(input.nextInt());

			System.out.print("Enter player's weight (Insert Digits only): ");
			//int w = input.nextInt();
			p.setWeight(input.nextInt());

			System.out.print("Enter player's year of birth: ");
			//int yob = input.nextInt();
			p.setYob(input.nextInt());

			System.out.print("Enter player's college (Abbreviation only (ex: Loyola University Chicago = LUC)) : ");
			//String coll = input1.nextLine();
			p.setCollege(input1.nextLine());
			///???????????????????????????
			System.out.print("Enter player's position:   ");
			//String pos = input1.nextLine();
			p.setPosition(input1.nextLine());


			/*p.setPlayerName(name);
			p.setCollege(coll);
			p.setYob(yob);
			p.setHeight(h);
			p.setJerseyNum(number);
			p.setPosition(pos);
			p.setWeight(w);

*/
			ourRoster.addPlayer(jerseyNum, p);

			System.out.print("Add another Player? y/n?" );
			answer = input1.nextLine();
		}

		System.out.print("Remove a player? y/n:   ");
		String answer2=input1.nextLine();
		while( answer2.equals("y")){
			System.out.print("What jersey number is player? ");
			int temp=input2.nextInt();

			ourRoster.removePlayer(temp, null);
			System.out.print("Remove another player? y/n?");
			answer2=input3.nextLine();
		}

		System.out.print("View Roster? y/n:   ");
		String answer3 = input3.nextLine();
		while(answer3.equals("y")){
			ourRoster.getAllPlayer(playerName, jerseyNum, height, weight, yob, college, position);
			System.out.print("View Roster? y/n:   ");
			answer3 = input1.nextLine();}

		System.out.print("Thank you! Goodbye :)");
	}
}
